<?
	$files = new Files();

	if($file = upload("upload")){
		ini_set('memory_limit', '48M');

		$data["upload"] = $file[0];
		$data["icon"] = $files->get_icon($file[1]);
	}

	$data['name'] = $_POST['name'];
	$data['target'] = $_POST['target'];
	$data['gid'] = $_POST['group'];
	$data['year'] = $_SESSION['year'];

	$db->update("common", $data, "id = $id");

	redirect("common.php");
?>